<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="lg" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="lg2"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/font.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/xadmin.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/cookie.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/font.css">
        <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/xadmin.css">
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  
  <body>
  
  	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
  <legend>${staff.staff_name}----[${staff.position.p_name}]----的详细信息</legend>  
</fieldset>
	<form class="layui-form layui-form-pane" action="">
		  
		 
		  
		  <div class="layui-form-item">
		    <div class="layui-inline">
		      <label class="layui-form-label">员工姓名</label>
		      <div class="layui-input-block">
		        <input value="${staff.staff_name}" disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <img alt="" src="${pageContext.request.contextPath}/${staff.photo}" style="width: 90px;height:90px">
		    </div>
		  </div>
		  
		  
		  
		  
		  <div class="layui-form-item">
		    <div class="layui-inline">
		      <label class="layui-form-label">员工编号</label>
		      <div class="layui-input-block">
		        <input value="${staff.staff_code}" disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <label class="layui-form-label">员工性别</label>
		      <div class="layui-input-block">
		        <input value="${staff.sex}" disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <label class="layui-form-label">身份证号</label>
		      <div class="layui-input-block">
		        <input value="${staff.card}" disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		    
		  </div>
		  <div class="layui-form-item">
		    <div class="layui-inline">
		      <label class="layui-form-label">员工籍贯</label>
		      <div class="layui-input-block">
		        <input value="${staff.natives}" disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <label class="layui-form-label">员工生日</label>
		      <div class="layui-input-block">
		      <input  value="<fmt:formatDate value="${staff.date}" pattern="yyyy-MM-dd" />" disabled ="disabled"  class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <label class="layui-form-label">员工年龄</label>
		      <div class="layui-input-block">
		        <input value="${staff.age}" disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <label class="layui-form-label">员工民族</label>
		      <div class="layui-input-block">
		        <input value="${staff.nation}" disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		    
		  </div>
		  
		  <div class="layui-form-item">
		    <div class="layui-inline">
		      <label class="layui-form-label">政治面貌</label>
		      <div class="layui-input-block">
		        <input value="${staff.political}" disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <label class="layui-form-label">婚否</label>
		      <div class="layui-input-block">
		      <input  value="${staff.marry}" disabled ="disabled"  class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <label class="layui-form-label">员工计算机等级</label>
		      <div class="layui-input-block">
		        <input value="${staff.computer}" disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <label class="layui-form-label">员工英语水平</label>
		      <div class="layui-input-block">
		        <input value="${staff.language}" disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		    
		  </div>
		  
		  <div class="layui-form-item">
		    <div class="layui-inline">
		      <label class="layui-form-label">员工学历</label>
		      <div class="layui-input-block">
		        <input value="${staff.degree}" disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <label class="layui-form-label">婚否</label>
		      <div class="layui-input-block">
		      <input  value="${staff.marry}"  disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <label class="layui-form-label">员工邮箱地址</label>
		      <div class="layui-input-block">
		        <input value="${staff.email}" disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		  </div>
		  <div class="layui-form-item">
		    <label class="layui-form-label">员工家庭住址</label>
		    <div class="layui-input-block">
		  		  <input value="${staff.address}" disabled ="disabled" class="layui-input">
		    </div>
		  </div>
		  
		  <div class="layui-form-item">
		    <div class="layui-inline">
		      <label class="layui-form-label">员工兴趣爱好</label>
		      <div class="layui-input-block">
		        <input value="${staff.specialty}" disabled ="disabled" class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <label class="layui-form-label">是否在职</label>
		      <div class="layui-input-block">
		      <input  value="${staff.state}" class="layui-input"  disabled ="disabled">
		      </div>
			</div>	
			<div class="layui-inline">
		      <label class="layui-form-label">员工所属部门</label>
		      <div class="layui-input-block">
		      <lg:forEach items="${dept}" var="d">
			    		<lg:if test="${d.dept_id==staff.dept_id}">
			    			 <input  value="${d.dept_name}" class="layui-input"  disabled ="disabled">
			    		</lg:if>
			    	</lg:forEach>
		     
		      </div>
			</div>
			<div class="layui-inline">
		      <label class="layui-form-label">员工职业</label>
		      <div class="layui-input-block">
		      <input  value="${staff.jt.title_name}" class="layui-input"  disabled ="disabled">
		      </div>
			</div>	    
		  </div>
		  <table class="layui-table x-admin">
			<thead>
				<tr>
					<th>员工名称</th>
					<th>合同编号</th>
					<th>合同名称</th>
					<th>签约时间</th>
					<th>生效时间</th>
					<th>到期时间</th>
					<th>职务</th>
					<th>试用期限</th>
					<th>试用薪资</th>
					<th>转正时间</th>
				</tr>
			</thead>
			<tbody>
				<lg:forEach items="${contracts}" var="m">
					<tr>
						<td style="display: none">${m.contract_id}</td>
						<td>${m.staff.staff_name}</td>
						<td>${m.contract_code}</td>
						<td>${m.contract_name}</td>
						<td><fmt:formatDate value="${m.signing_time}" /></td>
						<td><fmt:formatDate value="${m.contract_start}" /></td>
						<td><fmt:formatDate value="${m.contract_end}" /></td>
						<td>${m.contract_post}</td>
						<td>${m.use_time}</td>
						<td>${m.use_money}</td>
						<td><fmt:formatDate value="${m.formal_time}" /></td>
					</tr>
				</lg:forEach>
			</tbody>
		</table>
</form>  
<script type="text/javascript">
$("#but").click(function(){
	alert("sad");
	$.ajax({
		url:"http://172.16.2.199:8080/phase-view/titles",
		type:"get",
		dataType:"json",
		success:function(data){
			alert(data);
        }
	})
})
	
</script>
  
  </body>
</html>